package org.abc.fund.entity.funds;

import jakarta.persistence.*;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

@Entity
@Table(name = "fund_basic_info")
@Data
public class FundBasicInfo {
    @Id
    private String code;

    private String name;
    private String type;
    private String status;
    private BigDecimal latestNav;
    private LocalDate latestNavDate;
    private BigDecimal latestEstNav;
    private BigDecimal latestEstRate;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "manager_id") // 外键列名
    private FundManager manager;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "company_id")
    private FundCompany company;
}
